FAQ
What is JProxy?

What are the benefits of JProxy?

What Application Servers does JProxy support?

How to use JProxy?

How to get JProxy working with different EJB Server?

Where can I find a sample application and code example of JProxy?

Can I try JProxy on my server?

May JProxy work without Sun's Java Plug-in?

How JProxy does support asynchronous communication?

Does JProxy support EJB?

Does JProxy support JMS?

Does JProxy support CORBA?

Does JProxy support RMI?

May Applet utilize JProxy?

What is HTTP Tunneling?

Does JProxy support secure HTTPS tunneling?

Is it possible to set the timeout for HTTP/HTTPS Tunnel?

How to customize communication in JProxy?

 

What is JProxy?
JProxy is a product that solves number of intercommunication problems between Java Client and J2EE or CORBA Services.
JProxy overrides functionality of well-known APIs: EJB, RMI, JNDI, JMS and CORBA.
JProxy Server delegates JProxy Client's requests to appropriate remote objects. JProxy Server keeps references to remote objects and performs actual remote calls.
When asynchronous communication is used, JProxy Client behaves as a Server.

What are the benefits of JProxy?
It provides HTTP tunneling for CORBA, RMI and for J2EE API complaint services: EJB, JMS, and JNDI.
Client application/applet may utilize asynchronous message delivery for JMS over HTTP.
JProxy encapsulates provider specific implementations of J2EE and CORBA servers.
JProxy allows using EJB, RMI, CORBA and JMS without downloading Java Plug-in.
A Client-side library has a very small footprint: approximately 80K.
Developer may customize communication to handle different protocols, clustering and fail-over.

What Application Servers does JProxy support?
Currently JProxy has been tested on JBoss, Orion, JONAS, Bea WebLogic and Sun Reference Implementation EJB Servers. JProxy is generic communication solution and support of different servers is just a matter of modifying some properties in com/jproxy/proxy/proxy.properties file. We can provide help for deployment JProxy on any EJB Server.

How to get JProxy working with different EJB Server?
Typically communication with Application Server (EJB, JMS, CORBA) starts from obtaining initial naming context for the server. Usually it may be done calling default constructor without parameters: new InitialContext(); In other cases you have to specify some JNDI properties:
"java.naming.factory.initial" that specifies class name for provider-specific implementation.
And "java.naming.provider.url" that is a URL of Naming Service. Usually Naming Service Located on the same machine as Application Server.
By using JProxy, client implementation may be always same even for different Application Servers, because JProxy is using its own naming context factory and provider URL is hostname of JProxy Server.
The "Real" properties of Application Server is stored in proxyclient.jar in com/jproxy/proxy/proxy.properties file.
In some cases you need to modify these file in order to adjust JProxy for your Application Server.

How to use JProxy?
The JProxy is distributed as single-file J2EE Web Application (war-file). The application may be deployed on any J2EE-compatible Servlet Engine such as Apache Tomcat. The war-file may be also included in your Enterprise Application (ear-file) and deployed together with other modules of the ear-file. The war-file will be deployed under "TunnelServlet" context on your servlet engine. The JProxy may be configured through deployment descriptor of the war-file or explicitly during servlet initialization.
If J2EE deployment is not available, then the war-file can be unzipped and deployed on a servlet engine according to servlet deployment rules of your servlet engine.
The detailed installation and configuration described <here>.

Where can I find a sample application and code example of JProxy?
There are several "life" JProxy sample applets available on the site.
The site has a mail-list that based on EJB server. There are two implementations of front-end: one is JSP-based and another is Applet-based. Both of them you may try. This is a practically used application utilizing JProxy communication. The source code of Applet is <here>.
There are also two JMS sample applications using JProxy:
One of them is real-time Clock Applet. The server asynchronously updates the Clock every 10 seconds, using client's Message Listener.
The second sample is an Applet that allows entering a text message and sending it to JMS topic. The same applet receives echoed message. If second instance of applet is running it will receive the sent message also.
For each sample, source code is available.

Can I try JProxy on my server?
You may download trial version of JProxy. The version includes JProxy Servlet and JProxy Client.
The trial version may support up to 2 connected clients. The download also has documentation and examples.

May JProxy work without Sun's Java Plug-in?
Yes. We tested JProxy on Microsoft Internet Explorer 5.5 without Sun's Plug-in.

How JProxy does support asynchronous communication?
JProxy utilizes two asynchronous communication mechanisms depending on network environment. JProxy attempts to utilize client-side HTTP-server, just after asynchronous capabilities were requested on client. If server still cannot communicate with client's then polling mechanism utilized. It is possible to customize a frequency of polling.

Does JProxy support EJB?
JProxy provides HTTP tunneling for any EJB server provider! EJB client may obtain home interface of a bean through JNDI-complaint Proxy Naming Service of JProxy. The Proxy Service seamlessly delegates naming lookups to "real" JNDI service of EJB server.

Does JProxy support JMS?
Yes, JProxy enables synchronous and asynchronous JMS message delivery through HTTP. The site has several JMS sample applications utilizing JProxy.

Does JProxy support CORBA?
Yes. JProxy provides HTTP tunneling for CORBA. CORBA client does not need libraries for provider-specific CORBA implementation. It may be very helpful for applets using CORBA to reduce size of downloads. JProxy encapsulates specifics of CORBA implementation from CORBA client.

Does JProxy support RMI?
Yes. JProxy provides HTTP tunneling for RMI and RMI-like ORBs (WebLogic RMI).
JProxy even enables RMI for JVMs that originally do not support RMI, such as MS JVM.

May Applet utilize JProxy?
One of significant advantages of JProxy is small footprint (90K) and portability. JProxy enables most of Java Enterprise APIs for Browsers that are not aware of such APIs: for instance, MS Internet Explorer, which even does not "know" RMI may now work with EJB or JMS.

What is HTTP Tunneling?
The Firewalls is a common way to secure servers on the Internet. Many firewalls configured to allow HTTP or HTTPS traffic only. HTTP/HTTPS Tunneling is a mechanism of utilizing connectionless HTTP protocol to enable session-oriented services on the Internet.

Does JProxy support secure HTTPS tunneling?
It does. It uses Sun JSSE for HTTPS/SSL. The API is included in JDK 1.4 for earlier JDKs you must download JSSE from Sun: http://java.sun.com/products/jsse Read JSSE documentation.
JProxy supports HTTPS/SSL over Proxies/Firewall Servers. JProxy overrides Sun's SSLSocketFactory implementation. It allows utilizing timeout for HttpsURLConnection and fixing Sun's problem with communicating through Proxies that support not just HTTP 1.0 but also HTTP 1.1. For instance, the fix makes possible communication with famous Apache proxy.

Is it possible to set the timeout for HTTP/HTTPS Tunnel?
Yes. According to Java API, java.net.URLConnection does not expose the underlying socket. As result, you cannot set timeout for the socket. Timeout capabilities in JProxy implemented in two ways. First - based on overriding sun.net.www.protocol.http.HttpURLConnection, sun.net.www.protocol.http.Handler and sun.net.www.http.HttpClient. Second - using threads. JProxy automatically selects which one must be used based on the Java Security. If an applet does not have enogh security privileges it selects threading to support timeouts.
You may set default timeout in proxy.properties file in proxyclient.jar, or specify different timeout for each remote object.

How to customize communication in JProxy?
A custom protocol or fail-over algorithm may be utilized on client side by implementing TunnelInvocationInterceptor interface. The interface has only one method that takes as parameters java.reflect.Method instance of invoked method, arguments of the method and instance of stub. The interface may satisfy various demands, for instance: custom data marshalling, fail-over algorithm, debugging. An instance of class implementing the interface may be passed to JProxy thru Tunnel.setTunnelInvocationInterceptor().
The server side implementation must create at least one instance of GenericInvocator and also it has to be able to pass unmarshalled data to invokeAll() method of the instance. A Data passing to the call must be instance of Marshalable interface.


Copyright © 2001, JProxy